# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=libjcat
pkgver=0.1.14
pkgrel=1
pkgdesc="Library for reading and writing Jcat files"
arch=(loong64 x86_64)
url="https://github.com/hughsie/libjcat"
license=(LGPL)
depends=(json-glib gnutls gpgme)
makedepends=(meson gobject-introspection gtk-doc vala help2man)
source=("https://github.com/hughsie/libjcat/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.xz"{,.asc})
sha256sums=('702706d75ff0c7253d0f5697bdd482e8c2cfe9909749fc7d68ddb364730b7383'
            'SKIP')
validpgpkeys=(163EB50119225DB3DF8F49EA17ACBA8DFA970E17) # Richard Hughes <richard@hughsie.com>

build() {
  arch-meson ${pkgname}-${pkgver} build -D gtkdoc=true
  meson compile -C build
}

check() {
  meson test -C build --print-errorlogs
}

package() {
  DESTDIR="${pkgdir}" meson install -C build
  rm -r "${pkgdir}"/usr/{lib,share}/installed-tests/
}
